package com.baizhi.springboot.controller;

import com.baizhi.springboot.entity.Menu;
import com.baizhi.springboot.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class MenuController {
    @Autowired
    private MenuService menuService;
    @RequestMapping("/selectAllMenu")
    @ResponseBody
    public List<Menu> selectAllMenu() {
        return  menuService.selectAllMenu();
    }

}
